package com.guan.order.controller;


import com.guan.order.model.OrderInfo;
import com.guan.order.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/order")
public class OrderController {

    @Autowired
    private OrderService orderService;

    @RequestMapping("/{orderID}")
    public OrderInfo getOrderByID(@PathVariable("orderID") Integer orderID){
        return  orderService.selectOrderByID(orderID);
    }
}
